/*
 * @Author: xiawei 1243162387@qq.com
 * @Date: 2023-12-06 16:32:19
 * @LastEditors: xiawei 1243162387@qq.com
 * @LastEditTime: 2024-05-10 14:41:56
 */
export const getFields = (): any => {
    return [
        {
            type: 'input', prop: 'username', label: '姓名', col: 12,showWordLimit: true, maxLength: 20, rules: [
                {
                    required: true,
                    message: '姓名必填',
                    trigger: 'blur',
                }
            ]
        },
        {
            type: 'select', prop: 'jh', col: 12, label: '是否已婚', options: [{ label: '是', value: 1 }, { label: '否', value: 0 }], rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'change',
                }
            ]
        },
        // {
        //     type: 'remoteSelect', prop: 'yc', label: '远程搜素',
        //     remoteApi: (val: string, formData: any) => {
        //         return new Promise((resolve) => {
        //             setTimeout(() => {
        //                 console.log(val)
        //                 resolve([
        //                     { label: '城市1', value: 1 },
        //                     { label: '城市2', value: 2 },
        //                     { label: '城市3', value: 3 },
        //                     { label: '城市4', value: 4 }
        //                 ] as any)
        //             }, 1000);
        //         })
        //     }, rules: [
        //         {
        //             required: true,
        //             message: '必填',
        //             trigger: 'change',
        //         }]
        // },
        {
            type: 'date', prop: 'stateTime', col: 12, label: '开始时间', dateMaxLimit: 'endTime', rules: [
                {
                    required: true,
                    message: '开始日期必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'date', prop: 'endTime', col: 12, label: '结束时间', dateMinLimit: 'stateTime', rules: [
                {
                    required: true,
                    message: '结束日期必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'checkbox', prop: 'jn', col: 12, label: '技能', options: [{ label: 'react', value: 1 }, { label: 'vue2', value: 0 }, { label: 'vue3', value: 3 }], rules: [
                {
                    required: true,
                    message: '技能必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'radio', prop: 'sex', col: 12, label: '性别', options: [{ label: '男', value: 1 }, { label: '女', value: 0 }], rules: [
                {
                    required: true,
                    message: '性别必填',
                    trigger: 'blur',
                }]
        }
    ]
}